package cn.tedu.travelsystem.base.response;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

@Getter
@NoArgsConstructor
@AllArgsConstructor
public enum StatusCode {
    OPERATION_SUCCESS(200, "操作成功"),
    OPERATION_FAILED(400, "操作失败"),
    USERNAME_EXISTS(1000, "用户名被占用"),
    USERNAME_PASSWORD_ERROR(1001, "用户名或密码错误"),
    NOT_LOGIN(1002, "用户未登录"),
    VALIDATE_ERROR(8888, "参数校验失败"),
    THROWABLE_FAILED(666, "未知异常"),
    DATA_NOT_FOUND(4444, "数据不存在"),
    USER_NOT_EXIST(4445, "用户不存在"),
    REQUEST_TOO_FREQUENT(6666, "访问过于频繁"),

    // 新增的状态码
    ACCESS_LIMIT_EXCEEDED(7001, "访问频率超限"),  // 频繁请求访问限制
    BAD_REQUEST(7002, "无效请求"),                // 请求格式不正确或内容不符合要求
    INTERNAL_SERVER_ERROR(7003, "服务器内部错误"), // 服务器遇到错误，无法处理请求
    SAVE_FAILED(7004, "保存失败"),
    UPLOAD_FAILED(7005, "上传失败");
    private Integer state;
    private String message;
}
